<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>


<f:view> 

	<html>
		<head>
			<title>
				<h:outputText value = "ProjectTrack - Create a Project"/>
			</title>
			
			<link	rel = "stylesheet" 	
					type = "text/css"
					href = "stylesheet.css"/>
					
		</head>
		<body class = "page-background">
		<jsp:include page="/includes/header.jsp" />
		
		<h:form>
			<h:panelGrid	columns = "1"
							cellpadding = "5"
							headerClass = "page-header"
							footerClass = "project-background"
							styleClass = "project-background"
							rowClasses = "project-row">
							
				<f:facet name = "header">
					<h:panelGrid	cellpadding = "3"
									styleClass = "project-background"
									headerClass = "page-header"									
									>
						<f:facet name="header">									
							<h:outputText	value = "Create a project"/>
						</f:facet>
						<h:outputText	value = "Application messages"
										styleClass = "errors"/>				
					</h:panelGrid>
				</f:facet>
				
				<h:panelGrid	columns = "3"
								cellpadding = "4"
								cellspacing = "1"
								width = "100%"
								border = "0"
								rowClasses = "table-odd-row, table-even-row">
								
					
					<h:outputLabel	for = "nameInput">
						<h:outputText	value = "Name: "/>
					</h:outputLabel>
					<h:inputText	id = "nameInput"
									size = "40"
									required = "true">
						<f:validateLength	minimum = "5"/>
					</h:inputText>
					<h:message	for = "nameInput"
								styleClass = "errors"/>
					
					<h:outputLabel	for = "typeSelectOne">				
						<h:outputText	value = "Type: "/>
					</h:outputLabel>
					<h:selectOneMenu	id = "typeSelectOne"
										title = "Select the project type"
										required = "true">
						<f:selectItem	itemValue = ""	itemLabel = ""/>
						<f:selectItem	itemValue = "0"	itemLabel = "A"/>
						<f:selectItem	itemValue = "5"	itemLabel = "B"/>
						<f:selectItem	itemValue = "10"	itemLabel = "C"/>
						<f:selectItem	itemValue = "15"	itemLabel = "D"/>
						<f:selectItem	itemValue = "20"	itemLabel = "E"/>
						<f:selectItem	itemValue = "25"	itemLabel = "F"/>
						
					</h:selectOneMenu>
					<h:message for="typeSelectOne"	styleClass = "errors"></h:message>
					
					<h:outputLabel	for = "initiatedByInput">
						<h:outputText	value = "Initiated by: "/>
					</h:outputLabel>
					<h:inputText	id = "initiatedByInput"
									size = "40"
									required = "true">
						<f:validateLength	minimum = "2"/>
					</h:inputText>
					<h:message	for = "initiatedByInput"
								styleClass = "errors"/>
					
					<h:outputLabel	for = "requirementsInput">				
						<h:outputText	value = "Requirements contact: "/>
					</h:outputLabel>
					<h:inputText	id = "requirementsInput"
									size = "40">						
					</h:inputText>
					<h:panelGroup />
					
					<h:outputLabel	for = "requirementsEmailInput">					
						<h:outputText	value = "Requirements contact e-mail: "/>
					</h:outputLabel>
					<h:inputText	id = "requirementsEmailInput"
									size = "40">						
					</h:inputText>
					<h:panelGroup />
    				
    				<%@ include file="/includes/project_artifacts.jsp"%>
					
				</h:panelGrid>
				
				<f:facet name = "footer">
					<h:panelGroup>					
						
						<%@	include	file = "/includes/project_comments.jsp" %>
						
						<h:panelGrid	columns = "2"
										rowClasses = "table-odd-row">
							<h:commandButton	value = "Save"
												action = "save"/>
							<h:commandButton	value = "Cancel"
												action = "cancel"
												immediate = "true"/>
												
						</h:panelGrid>
					</h:panelGroup>
					
				</f:facet>
							
			</h:panelGrid> 
		
		</h:form>
		
		</body>
	</html>
</f:view>